﻿<UserControl x:Class="CustomerAssistant.TrayMenu"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300" Width="180">
    <Border BorderBrush="Silver" BorderThickness="1" Name="border1" CornerRadius="6">
        <Grid Width="180" MinHeight="40">
            <ListBox x:Name="listbox1" BorderThickness="0" HorizontalContentAlignment="Stretch" FontSize="12">
                <ListBox.ItemContainerStyle>
                    <Style>
                        <Setter Property="Control.Padding" Value="0"/>
                        <Setter Property="Control.SnapsToDevicePixels" Value="True"/>
                        <Setter Property="ListBoxItem.FocusVisualStyle" Value="{x:Null}"/>
                        <Style.Triggers>
                            <Trigger Property="ListBoxItem.IsMouseOver" Value="True">
                                <Setter Property="ListBoxItem.Background" Value="#FFA9CBF1"/>
                            </Trigger>
                            <Trigger Property="ListBoxItem.IsSelected" Value="True">
                                <Setter Property="ListBoxItem.Background" Value="White"/>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </ListBox.ItemContainerStyle>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Focusable="False">
                            <Border CornerRadius="0" Focusable="False"
                                Background="{Binding Path=Background,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}}}">
                                <Grid TextBlock.Foreground="#FF25374F"  Focusable="False">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="25"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="{Binding Path=Name}" Margin="25,5,5,5" Grid.Column="0"/>
                                    <Rectangle Height="1" Fill="#FFDCE5EA" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,23,0,0"/>
                                </Grid>
                            </Border>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Border>
</UserControl>